In fields of printers and displays, an image, i.e., text, photograph, graphic and the like, is output by printing the image on a printing medium or by displaying the image on a display. An image that is an output target, hereinafter, referred to as “target image”, has various color characteristics. The target image may be a monochrome image or a color image.
Adding a remark to the definition of the term “image” throughout the specification, when a document of one page is divided into an object part, i.e., text, photograph, graphic and the like, and a background part, i.e., background color part, the term “image” should not be interpreted to mean a term indicating only the object part and should be interpreted to mean a term indicating the whole document including the background part. According to this definition, the term “image of one page” means “an image that is displayed on the whole document of one page.”
In the fields of printers and displays, when a target image i.e., document, is actually a monochrome image, it is ideal to output the target image in a monochrome output mode after distinguishing the target image as a monochrome image. Likewise, when a target image is actually a color image, it is ideal to output the target image in a color output mode after distinguishing the target image as a color image.
Accordingly, in the field of image outputting, based on image data indicating an image of one page, an image output mode for outputting the image has been selected page by page as one of a plurality of output modes including a monochrome output mode and a color output mode.
According to a technology disclosed in related-art, based on image data indicating a target image, color pixels are extracted from a plurality of pixels configuring the target image and are counted. When a number of counts exceed a threshold value, the target image is distinguished as a color image. Also, the target image of one page is divided into a plurality of blocks, blocks including color pixels are extracted from the plurality of blocks and a number of the color pixels in the extracted blocks are counted as the number of color pixels.
According to a technology disclosed in another related-art, the image data, which is obtained by reading a document, is divided into a plurality of blocks and it is determined whether each block is a color block or a monochrome block. The number of the color blocks is counted. When the number of counts exceeds a threshold value, it is determined that the image of the document is a color image. On the other hand, when the number of counts is the threshold value or smaller, it is determined that the image of the document is a monochrome image.
The inventors of the invention performed various researches regarding the image processing method of selecting, based on image data indicating an image, an image output mode for outputting the image from one of a plurality of output modes including a monochrome output mode and a color output mode. As a result, the inventors found the following findings, which will be specifically described later.
When a color part exists in a document to be read, it is natural that a reading result of the document includes the color pixels. However, even though a document to be read does not include a color part, the reading result of the document may include the color pixels due to a color shift, which will be specifically described later, at the time of reading an image.
When the color shift occurs, the document may be misclassified into a color image and thus a color output mode may be erroneously selected, even though the document should be normally classified into a monochrome image and a monochrome output mode should be selected. When performing the image processing, it is important to prevent the misclassification of the target image and the erroneous selection of the image output mode due to the misclassification.
Hereinafter, a situation where a document is classified into a color image when a ratio of the number of color pixels of a plurality of pixels configuring a target image, i.e., a document of one page, to a number of total pixels configuring the document is larger than a threshold value is considered.
In this case, the classification result of the document depends on a ratio of the number of color pixels, which is a ratio of the number of color pixels to the total number of pixels. In the meantime, regarding a case where a color object, i.e., text, photograph, graphic and the like, exists on a document, when a first color object is displayed on a first document in a large size, the ratio of the number of color pixels is large. However, regarding a case where a second color object is displayed on a second document in a small size, for example, where the second color object, which is the first color object being reduced, is displayed on the second document having the same size as the first document, the ratio of the number of color pixels is small.
Since the two documents both have the color objects, the two documents should be classified into a color image. However, in some cases, when the color object is displayed in a large size on the document, the document is classified into a color image, but when the color object is displayed in a small size on the document, the document may be erroneously classified into an image other than a color image, for example a monochrome image, due to a reduction in the ratio of the number of color pixels. Accordingly, an output mode other than the color output mode may be erroneously selected. Therefore, when performing the image processing, it is also important to prevent the misclassification of the target image and the erroneous selection of the image output mode due to the misclassification.
Based on the above-described findings, aspects of the invention provide a technology of classifying an image with respect to color characteristics thereof, based on image data indicating the image, and selecting an image output mode, and an object of the invention is to easily prevent a misclassification of color characteristics of an image.